using System.Collections.Generic;
using System.Configuration;
using Needle.Core.Injection;

namespace Needle.Core.Configuration {
    /// <summary>
    /// The collection of injected arguments
    /// </summary>
    public class ArgumentElementCollection : NeedleElementCollection {

        /// <summary>
        /// Create a new element.
        /// </summary>
        protected override ConfigurationElement CreateNewElement() {
            return new ArgumentElement();
        }

        /// <summary>
        /// gets the key of the  element (the index).
        /// </summary>
        protected override object GetElementKey(ConfigurationElement element) {
            return ((ArgumentElement)element).Index;
        }

        /// <summary>
        /// The name of the item xml element.
        /// </summary>
        protected override string ElementName {
            get {
                return Element.Arg;
            }
        }

        internal IList<Needle.Core.Injection.IParameter> GetParameters()
        {
            List<IParameter> parameters = new List<IParameter>();
            foreach (ArgumentElement item in this)
            {
                
            }
            return parameters;
        }
    }
}
